//my.js
const util = require('../../utils/util.js');
Page({
  data: {
    // login:true,
    member: false,
    is_modal_Hidden: false,
    is_login_Hidden:false
  },
  onLoad: function () {
     
  }, 
  // login: function () { 
  //   let that = this;
  //   wx.navigateTo({
  //      url: '/pages/login/login' 
  //   })
  // },
  userMsg: function () {
    let that = this;
    let members = that.data.member;
    if (members != true) {
      wx.navigateTo({
         url: '/pages/userMsg/userMsg' 
      })
    }
  },
  membercode: function () {
      wx.navigateTo({
         url: '/packageA/pages/mycode/mycode' 
      })
  },
  moneyBlance: function () {
      wx.navigateTo({
         url: '/packageA/pages/blance/blance' 
      })
  },
  orderList: function (e) {
    let that = this;
    let status = e.currentTarget.dataset.state;
    wx.navigateTo({
      url: '/pages/orderlist/orderlist',
      // events: {
      //   orderlistPage: function(data) {
      //     console.log(data)
      //   } 
      // },
      success: function(res) {
        res.eventChannel.emit('orderlistPage', { data: status })
      }
    })
  },
  // myCoupon: function () {
  //    wx.navigateTo({
  //       url: '/pages/mycoupon/mycoupon' 
  //    })
  // },
  Address: function () {
    wx.navigateTo({
        url: '/pages/address/address?status=0' 
    })
  },
  kfLine: function () {
     wx.makePhoneCall({
        phoneNumber: '1340000'
    })
  }
})
